refactoring inorder method