Implemented the levenshtein algorithm