move javascript to application.js