Completed getGraph