Experiment with tree rewriting