graph.py now generic 2