replaced kdtree smart pointers w/ real pointers; great speedup