Adding union find exercise