Submitted version of assignment 3 (GRAPH)