refactor voting client