correction to model.js