mar's app.js fix