Merge modules 1 and 2 did not work. Now, threaded version is slower than single thread version.