optional hostname resolution