preorder and inorder traversal