working on polymorphic type chapter