Added the updateNetwork function