add disjoint_set of arbitrary types