Added a factory method