Got it sorted, works locally, crashes when deploying to heroku. But that's a tomorrow problem, now it's time to freak up a fix I guess