sub_total and total, plus tests