filter_tasks replaced with valid_task