add diagram for factory method