added hostname check