let outside scope see pages and currentPage (optional)