fold_n base and regression