KMP_match with still puzzled getNext algorithm