accept a single filter function