added option to pass a different host name