removed offending atoi and added character manipulation. It will work for single digit groups, but not beyond.