add LeaderElection class.