added pageControl code