make queryBox and queryPoint also return the length