generate master automatically