update solution of Edit Distance