completed functions in graph.cpp