new version of app.js. Logical error is logical