var total changed to addition

var total changed to addition as compared to multiplication as it was
previously