disjoint_set modified