changed message type to unsigned char