added a little optimization for strings in charArray