added model.r to make a single model for production