generate model reader