char array generalization