add support for leader election