     private var prevScrollingIndex = -1
     private var prevPageIndex = -1
     
-    private var changePageWaitForCallback = false
-    private var changePageCallback: ((Void) -> (Void))?
+    private var isWaitingForPageChangedCallback = false
+    private var pageChangedCallback: (Void -> Void)?
     
     private var tabSectionHeight: CGFloat = 0
     private var contentSectionHeight: CGFloat = 0

        moveToIndex(index, animated: animated)
    }
    
    public func changePageToIndex(index: Int, animated: Bool, withCallback callback: (Void) -> Void) {
        changePageWaitForCallback = true
        changePageCallback = callback
        changePageToIndex(index, animated: animated)
    }
    
    // MARK: private methods
    private func stopScrolling() {
        tabSectionScrollView.setContentOffset(tabSectionScrollView.contentOffset, animated: false)
        contentSectionScrollView.setContentOffset(contentSectionScrollView.contentOffset, animated: false)

    
    // scrolling animation stop programmatically
    public func scrollViewDidEndScrollingAnimation(scrollView: UIScrollView) {
        if (isWaitingForPageChangedCallback) {
            isWaitingForPageChangedCallback = false
            pageChangedCallback?()
        }
    }
    
