finished archive function