add crc calculation