add UnionFind interface