Made graph.py better