refactor convertCharacters to its own method.