modify addHost but it has some problem