moved behavior in the factory method.