changed variable from char* to char at very first line