could use getenv to pass n_threads