rework for archive
rework for archive
refactoring...in need of tests