removing inline script and adding it to application.js