uniform pattern matching