more reliable c-folding