add counter, crc and sync