Implemented fast fourier transform algorithm