pattern class