use a vector instead of a char array