updated union-find test