Updated python code ... breaking up the levenshtein distance computation