update union find