Edit Distance Script