added tree reduction example