Merged serial and threaded approaches into 1 file. Why does the threaded one take long?