Edit distance update