updated query ball tree wcounts