update factory method