added a helper for subtotal