add pattern extraction section