update editdistance