tree fixes; flow example improved