testing pattern recognition