edit application.js function