factory method of design patterns