added ability to override hostname