add UnionFind structure