cleaned model.js