changes to kdbtree