archive refactor