use patch gen.py