Factor out the number of cores