changed example detector to one that is better optimized