cleaned up archive script