     }
     
     public func updateSelectionIndicatorPosition(offsetX: CGFloat) {
-        var frame = appearance.selectionIndicatorFrame(currentIdx)
+        var frame = buttonsScrollView.selectionIndicatorFrame(currentIdx)
         guard let pageViewScrollView = pageViewScrollView else { return }
-        frame.origin.x += ((offsetX - pageViewScrollView.frame.size.width) / pageViewScrollView.frame.size.width) * appearance.button.buttonWidth
-        selectionIndicatorView.frame = frame
+        frame.origin.x += ((offsetX - pageViewScrollView.frame.size.width) / pageViewScrollView.frame.size.width) * buttonsScrollView.appearance.button.width
+        buttonsScrollView.selectionIndicator.frame = frame
     }
     
     // MARK: - Buttons

        
        guard let pageViewScrollView = pageViewScrollView else { return }
        dispatch_async(dispatch_get_main_queue()) { [weak self] in
            guard let wself = self else { return }
            wself.updateSelectionIndicatorPosition(pageViewScrollView.frame.size.width)
        }
    }
    

        while nextIdx != idx  {
            nextIdx  += ((dir == .Forward) ? 1 : -1)
            dispatch_async(dispatch_get_main_queue(), { [weak self, nextIdx, vcs, dir] in
                guard let bself = self else { return }
                /// set the view controllers to be displayed
                bself.pageViewController.setViewControllers([vcs[nextIdx]], direction: dir, animated: true) { (finished) in
                    if finished {
                        bself.currentIdx = nextIdx
                    }
                }
                
                })
        }
    }
