fixed missing curly bracket and duplicated function name in app.js