Implemented setKdTree()