begin refactoring of graph.py