Centralise filtering logic = easier to test, less duplicated code