modify factory method