check for subsequence