Changed to undirected graphs