separate network logic to NetworkManager