make xcorr work and test it