Modified test for kdtree