Adding undirected graph implementation