Update the factory method