vote refactoring