finished subtotal and total calculating