refactoring for heroku release