finish KMP