unionfind for 1.5.7