updating to use NetworkState object
updating to use NetworkState object