Trying to improve connected components