Updated graph.py