modified the number of threads.