moved some of the logic to other files in application.js