cleaned up the archive script