update element.ps1 and add pattern.ps1