make connected components horribly imperative