changed char hexval to const char hexval