Implemented adding a task.