add solution for distinct subsequences