converting string to char array and lower case