made patch in kdtree.h "nicer"