refactor of address and host