A dynamical model for reaching consensus in group decision making