MODIFIED: longest similar subsequence