return manipulated tree