this works local and on heroku