refactor structures