the four types of design patterns