greatly improved the efficiency of the character-by-character parser