issue #8 add pattern matcher