refactoring builtin_char