archive function was coded incorrectly