update groupId
Add Union Find implementation