Modified to work with Heroku