refactoring the StringNormalizer