implement crc checking