Changed the graph class

removed the node thinking