add kmp code from white book