Making queries work with lists instead of macros