Added graph implementation