Added and implemented getGraph