implements fft and freqCorrelation