Now works on heroku

took several fixes but now works