Use forEach in method "sum"