Add pattern class