updated the way gross and net totals are calculated