             index = NSIndexPath(forRow: count - 1, inSection: 0)
         } else {
             // between both side
-            var center = offset
-            center.x += self.width / 2
-            index = collectionView!.indexPathForItemAtPoint(center)
+            index = collectionView!.indexPathForItemAtPoint(centerOffset())
         }
         //        log("size = \(collectionView!.contentSize), offset: \(collectionView!.contentOffset), index: \(index?.row)")
         return index

    
    private var pageControl: UIPageControl!
    private var currentRealPage: Int = -1
    private var currentPage: Int = -1
    private var preferredPageConrolHidden: Bool = false
    public var collectionView: UICollectionView?
    private var collectionLayout: HFSwipeViewFlowLayout?
    

        return NSIndexPath(forItem: minIdx, inSection: 0)
    }
    
    private func centerOffset() -> CGPoint {
        var center = self.collectionView!.contentOffset
        center.x += self.width / 2
        return center
    }
    
    private func centeredOffsetForIndex(indexPath: NSIndexPath) -> CGPoint {
        var newX: CGFloat = 0
        if circulating {
