tree rewrite relative