filter method now works right
changed a little bit filter method and made queries no-results-proof