Changed add task function to use newTask model