more refactoring for new types