linear interpolation working, union-find not correct