put the generator as a member field