Changed subtotal logic