set number of threads equal to cores available