move saving of the account to the controller level