minor update generate.py