Adding compute_checksum code