Parametrized failure functions, to go not to the longest suffix, to the X suffix. And I added the edit distance, to check our distance with it.