REF: move initTotal() into Util