change the fold method