refactoring structure 2