Refactoring, polymorphic-straign example