defined checksum function in same script