add expand_host logic