extract subtotal function
make calculating totals recursive
more compact representation of discounts