updated the generator.py file