changed the way the total line is handled