network checking code is added.