choosing the number of cores with detectCores()