FlexibleSequenceMatcher -> separate classes
removed FlexibleSequenceMatcher, self-loops