generate states model/controller