updating loop to account for network loss