added function to print tree in postorder