network: added diff function.