implemented task_queue counter to keep track of task completion status.