refactoring RegressionTree