init kdtree