Added filtering for the tasks