intermediate step for fft