final commit, fixed error handling
comments in app.js