finished voting functionality