part 2 and disjointsets