pattern formatting