added file gen_mod.py (doesn't work properly)