shouldn't the kdtree be creating nodes on median values of an axis ? nodes should not get deeper than dimensions ?