renamed db.js to model.js