generate correct model