changed from unit_8 to unsigned char