Add filter function (Task4) (WIP)