added diffimage logic