Implemented averaged diff sampling.