add check the number of masters script generator