Use alredy generated hosts list in assignment.

Code review tweaks