finished vote refactor