testing disjoint sets