 // MARK: - UIScrollViewDelegate
 
 extension CarouselViewController {
-
+    
     override func scrollViewDidScroll(scrollView: UIScrollView) {
         if scrollView == collectionView {
-            pageControl.frame.origin.x = (scrollView.bounds.width - pageControl.frame.width) / 2 + scrollView.contentOffset.x
-            pageControl.frame.origin.y = scrollView.bounds.height - pageControl.frame.height + scrollView.contentOffset.y - controlInsetBottom
-            pageControl.currentPage = loopedPageForPage(page)
+            updatePageControl()
         }
     }
     

        scrollToPage(pageControl.currentPage, animated: true)
    }
    
    private func scrollToPage(page: Int, animated: Bool) {
        let loopedPage = loopedPageForPage(page)
        let scrolledPage = loopedPage + (looping ? 1 : 0)

    }
    
    private var looping: Bool {
        return looped && pageCount > 1
    }
    
    private var scrolledPage: Int {
