added saving of tasks