pattern matching pain