moved rescaling out of the fourier loop