added in order traverse and a functor to print the tree