add archive function.