issue #6 refactor application.js