add subtotal feature