define pattern model