V3.1.2, eliminate one call per folding