Updated to allow passing of hosts down