to complete string_lcs function for signature creation