fixed editElection method