Added functionality for creating the new task.