nthreads variable introduced