add examples for leader election and locks