Add filter function.