Export UnionFind function

I was playing around with this but was getting an error, looks like the function isn't getting exported for the module.