use foldLeft which is faster in Iterable Foldable