hierarchy refactoring