fix index bug
edit distance, good