modify graph.c