searching with folds