replace doSNOW to doParallel