Added checksum calculation method