keep totals by version instead of just sum.