using location.host instead of hardcoded value