modifications to FFT functions