using unsigned char instead of uint8_t to compile under windows