add save storage logic