added proper scaling in fft()