undirected graph finished