commented connected components algorithm