moved single character logic to a core functions file