re-tree and simplify