edit distance, but too slow for 10k+ long strings, need to think of a better way to do this.