set mode action in createElection