determine right hostname