adding 'xdiff' routine