initial untested version of connected_component_search