added the graph class