made some changes to potentially match query subset permutations. also possible that I broke everything, can't test on this machine really