Modified Graph.java