update initializer when generating a resource