modify addTask method