Add traverse_tree function to interface