modify the graph