set thread number