use foldl/5