Improved pattern matching collection