implemented multithreaded version of fft