add distinct subsequences