recursive folding during import