             //            visiblePages.insert(page)
             visiblePages.append(page)
             pagingScrollView.addSubview(page)
-            
+            print("Page added at index \(index)")
             // if exists caption, insert
             if let captionView = captionViewForPhotoAtIndex(index) {
                 captionView.frame = frameForCaptionView(captionView, index: index)

    
    // photo's paging
    private var visiblePages = [SKZoomingScrollView]()//: Set<SKZoomingScrollView> = Set()
    private var initialPageIndex: Int = 0
    private var currentPageIndex: Int = 0
    

        
        // reset local cache
        visiblePages.removeAll()
        recycledPages.removeAll()
        
        // set content offset
        pagingScrollView.contentOffset = contentOffsetForPageAtIndex(currentPageIndex)
