code for create new election