refactoring: new type hierarchy