revise KMP