 
         let currentPage = Int(round(contentOffsetX/pageWidth))
         if currentPage == self.currentPage { return }
-        self.currentPage = currentPage
+        setCurrentPage(currentPage: currentPage)
     }
 
     public func updateViewSize() {


    // MARK: private

    private let scrollView: UIScrollView = UIScrollView()

    private var itemSize: CGFloat {


        case left, right, stay
    }

    private func behaviorDirection(x: CGFloat) -> Direction {
        
        switch x {
        case let x where x > scrollView.contentOffset.x:
