Adapted for Heroku