dynamic number of cores