cache host on the stack so we only look it up once