pattern checking

pattern check