refactored schema in app.js