determines next healthy controller to become master