start refactoring the graph system