bk-tree: first working query functionality