added find edit distance code