make function public: visiblePageForIndex