Changed code to focus on getting sum.