modified writing of number of clauses in task_manager