refactoring - translate_chars function created