modify the output of tree model