kmp

still need to think about it a little bit.