more structure refactoring