tree traversal problems