Add a method to apply filters for tasks