start refactoring archive js