refactored on start handler to app.js file