refactored application.js, multiple functions used