Updated to use the right variable for the hosts list.
Tests should now pass after adding return values.