Improved function and variable namings in read(int), and improved
related for loop
Improved function naming: renamed read(id) into getTask(id)
Improved function naming: renamed write(task) into addTask(task)