working MyKMP.java