KMPR with pattern