Change the factory method to Class method