Add logic to detect host