revised, previous version didn't fix things to work with heroku