I moved this out to prediction.js since it felt like a better place to put it, and I don't like clogging up application.js