added algorithm for calculating partial edit distance (untested)