typed the number of threads