implemented basic voting functionality