traverse functions. pre/in/post order.