cumprod and prod