kdtree stuff set up