updated cast for const char