deal with any degree for a connected component for reconstruction