expanded the generator API