updated the GraphGenerator.java class