Construction of trees for model based