refactored main js code to app.js