The index of the longest match is now a factor