project-1 leader election code version-1