refactored the archive-pagination