position: swap query and queryAll; queryAll and queryArray
algebraic: a fair first whack at implementation