implement recover_trees