- update app.js
  - moved var declarations to the top of the scope