         }, completion: { (Bool) in
             
         })
-
-        
-        
-        
+    }
+    
+    func changeToIdentiPosition()  {
+        
+        self.collectionView?.performBatchUpdates({
+            for i in  0 ..< self.cellsToMove0.count{
+               
+                    UIView.animate(withDuration: 0.2, animations: {
+                        let cell = self.cellsToMove0[i] as! UICollectionViewCell
+                        cell.transform = CGAffineTransform.identity
+                    })
+            }
+            
+            for i in  0 ..< self.cellsToMove1.count{
+               
+                    UIView.animate(withDuration: 0.2, animations: {
+                        let cell = self.cellsToMove1[i] as! UICollectionViewCell
+                        cell.transform = CGAffineTransform.identity
+                    })
+                
+            }
+            
+            
+        }, completion: { (test) in
+            
+        })
+//        -(void)changeToIdentityPosition{
+//            
+//            [self.collectionView performBatchUpdates:^{
+//                
+//                for(ImageCollectionViewCell *cell in cellsToMove1){
+//                
+//                [UIView animateWithDuration:0.2 animations:^{
+//                cell.transform = CGAffineTransformIdentity;
+//                }];
+//                
+//                }
+//                
+//                for(ImageCollectionViewCell *cell in cellsToMove0){
+//                
+//                [UIView animateWithDuration:0.2 animations:^{
+//                cell.transform = CGAffineTransformIdentity;
+//                }];
+//                }
+//                
+//                } completion:nil];
+//        }
+//        
+
     }
     
     func scrollIfNeed(snapshotView:UIView)  {

                    let nestedHeight = 2.0
                    //floor(xOffset)
                    //floor(yValue)
                    print("\(floor(xOffset))in right of the cell line ")
                    print("\(floor(yValue))in right of the cell line ")
                    self.collectionView?.performBatchUpdates({
                        self.lineView.frame = CGRect(x: xOffset, y: yValue, width: CGFloat(nestedWidth), height: CGFloat(nestedHeight))
                        self.lineView.backgroundColor = UIColor.black

                        self.moveCellsApartWithFrame(frame: (self.lineView.frame), andOrientation: 0)
                        
                    })
                }else if differenceRight < 20 && differenceRight > 0{
                    
                    print("Insert to the right of the cell line")
                    lineView.removeFromSuperview()
                    
                    let  xOffset = destinationCell.frame.origin.x + destinationCell.frame.size.width + 5
                    let  yValue = destinationCell.frame.origin.y
                    let nestedWidth = 2.0
                    let nestedHeight = sourceCell?.frame.size.height
                    //floor(xOffset)
                    //floor(yValue)
                    //print("\(floor(xOffset))in right of the cell line ")
                    //print("\(floor(yValue))in right of the cell line ")
                    self.collectionView?.performBatchUpdates({
                        self.lineView.frame = CGRect(x: xOffset, y: yValue, width: CGFloat(nestedWidth), height: nestedHeight!)
                        self.lineView.backgroundColor = UIColor.black
