adding support for kdtree