Add filter function to stack.