revert gen.py (I don't know why it is changed)