switch back to C, using string.h functions, and it's working