MOD: add fold code