modified graph/graph.go