added option to set the hostname