added saving of character