checksum and parseData subroutine