Folding version that includes f-dot; just-as-fast python version