changes to gen_graph.py