optimize Foldable methods