change corr fun calculation to FFT method.