typedef unsigned char BYTE for mac