add edit distance