added support for hostname