kmp.cpp -- updated and cleaned up code