CALCULATE TOTAL