skip empty connected components