added some functions in app.js
merges app.js