add util to compute edit-distance