KdTree: Updating the nearest API