adding task_monitor method that will watch the state of each called task