add externals diff function