made checkObtainedHostIds more genric to be available from others.