finished refactoring enough for now on the graph structure