updating code for deployment on heroku