moving checksum into its own method