structure for patterns