walk the tree, to prepare for exporting