Working con connected components
Working on connected components