add initializer for the hostname

Fixes #1