cast hosts to array.