added cks_sub and cks_sub_len