add edit distance algorithm