finish graph.c