Allow the caller to specify the generator