added fft and esd functions