removed connected_graph as moved the code to be part of original graph