finished implementation of voting