Changed from doMC to doParallel as doMC does not work on Windows