Changes on the code to only get actually available hosts