add pattern diagram