convert list version to a fold, add pipes version