added gen_flows.py