run isMaster command first