Changing the total formula