Started writing KMP part