added onGenerateDefaults