Added checksum and corrected output