refactored updates to network disconnection detection