Changing number of threads