reshaping trees