add a few simple methods to Graph, create ConnectedComponents