created comments in task_manager.py to explain each line