added support for OMP_NUM_THREADS