updated model.js