added string to char function