Working but with one problem, don't process the last character.