reduce effort for while loop in host_get_infection_alternative