updates and fixes to Union Find