polymorphicFactory