allow control of number of threads from command line