Add explicit number of threads as option