implement pattern builder