Better implementation of FFT