factor out hostname