simplified checksum algorithm