some tests of pattern detection