read in char array