add pattern controller