Adds the functionality to add a task.