implement cross validation for random forest