Abstracted away the computation of fft into a separate function named compute_fft