Knuth Morris Pratt slight algorithm modification