edit distance 2nd