clean up query test and allow for multiple-attribute attribute-comparisons