big structure refactoring