revise vote_model's function and make it more concise