modified the interface to the generator