add pattern model