modified for FFT-based spectral method