use a foreach for getting host and remove window.off(resize)