merge from Hao's correct FFT