update archive function