completed voting functionality