reversed a cstring function