implement cross validation for gbm