Improved function naming: renamed write(task) into addTask(task)