add pattern matcher