use inorder to print the traversal