adjusted save method