Add diffavg1 code.