Added version of findhost from gist