modified to use 10 folds to test with validation sets