         
         if let contentSize = collectionView?.contentSize, dynamicAnimator = dynamicAnimator, items = super.layoutAttributesForElementsInRect(CGRect(x: 0, y: 0, width: contentSize.width, height: contentSize.height)) {
             if dynamicAnimator.behaviors.count < 1 {
-                for (index, item) in items.enumerate() {
+                for item in items {
                     let behaviour = UIAttachmentBehavior(item: item, attachedToAnchor: item.center)
                     behaviour.length = 0
                     behaviour.damping = 0.8

                case .Vertical:
                    let delta = newBounds.origin.y - collectionView.bounds.origin.y
                    let touchPoint = collectionView.panGestureRecognizer.locationInView(collectionView)
                    for (index, behavior) in behaviors.enumerate() {
                        let yDistanceFromTouch = fabs(touchPoint.y - behavior.anchorPoint.y)
                        let xDistanceFromTouch = fabs(touchPoint.x - behavior.anchorPoint.x)
                        let scrollResistance = (yDistanceFromTouch + xDistanceFromTouch) / 1500

        return super.layoutAttributesForElementsInRect(rect)
    }

    public override func layoutAttributesForItemAtIndexPath(indexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? {
        if let attributes = dynamicAnimator?.layoutAttributesForCellAtIndexPath(indexPath) {
            return attributes
        }
