use stack for inorder