pattern builder