add Graph.java class