updated char* to const char* in function parameters