add 3rd argument to build_with_polymorphism.