don't know why the code doesn't work on heroku