adding decimate and update_xcorr