add num_threads option