network: adjust old code to new interface