refactor pass data-host in form and refactor refresh_host