polymorphic generator