adding pattern directive