script for crossvalidation