proper filtering by query: