started implementing sum product