changed for to parfor