improved model generator