Updated the code for in order traversal