add kmp algorithm