find_host function added