adds pattern stuff