factory method updated