added checksum support to c++ class