add support for specifying hostname