add type disp function
fixed compute_pos function
implemented UnionFindTree