moved parallel to the cross validation code