a little bit pattern checking