kdtree to master