rewrite the ranking function in vote_model and the code now looks more
elegance~