kmp final