Improvement for fold method
Remove redundant condition
Merge commit 'feature/improve_fold_method'