upraveny leaderElection a BFS