Added adjacency graph implementation