added fft but script is slow now