test the generateLastCharTotal