add switchToMaster