Finished model.js