should this be in application instead of the template.js?