updated model generator