in the middle of large refactoring to make data structures polymorphic