split hosts by groups