fold and sample, better example