changed the pre, post, and inOrder expressions to take function pointers of the current node