added support for pattern on multiple lines, especially handy when defining lot of types