add a tree truncation function