changed instanceCores to numberOfCores