adding code to detect host details.