creating model generator