rewriting the post order