support custom patterns