added dataDir as input parameter to populateCores