add pattern support
docs