pattern attribute and method