updated char* casting