Add factory method to the Model class