         
         views.enumerate().forEach { (viewIndex: Int, view: UIView) -> () in
             let center = view.center
-            let potentialDistance = distanceBetweenPoint(x1: center.x, y1: center.y, x2: contentViewCenter.x, y2: contentViewCenter.y)
+            let potentialDistance = distanceBetweenPoint(point1: center, point2: contentViewCenter)
             
             if potentialDistance < distance || !hasItem {
                 hasItem = true

        } else {
            view.transform = CGAffineTransformIdentity
        }
        view.setNeedsLayout()
    }
    
    private func centerScrollViewContents() {

        return index
    }
    
    private static func distanceBetweenPoint(point1 point1: CGPoint, point2: CGPoint) ->  CGFloat {
        let distance = Double((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y))
        let squaredDistance = sqrt(distance)
        return CGFloat(squaredDistance)
    }
