add a test for the query filtering