kdtree finished need to refine