working voting functionality without validation