improving networking setup script