fixed total and added subtotal