code for voting