tests for querying