structure refactor