Working version of FFT. Without any optimizations