Add edit distance calculator

from old work, to be committed