adding all functionality for the graph except search