Adapted to new NetworkService API