add a reset for connected components