added simple filtering when paging