trying to implement checksum