changed result type to const char* instead of char*