transfer all code in script.js into app.js