finished pthread parallel edit distance