Pattern builder