Patterns update

"global context" checkbox added