fog refactor for heroku