KdTree implemented