added check for checksum