kdtree without runtime erro