added conditional check to move things around inside heroku