updated program to support character array