add the script to calc edit distance