finished adapting app.js to sequelize model