[rewrite] inorder preorder