added history too xcorr