Create patterns outside of the closure