use unsigned char instead of char for byte values