             // next image
             if(velX < -1000){
                 
+                isImageTransition = true
+                
                 // reset the preview mode since we are loading a new image
                 previewMode = previewStates.none
                 
                 print("NEGATIVE speed reached")
+                
+                // move the preview image into focus
+                // remove old dynamic behaviour
+                if let behaviour=attachment2{
+                    animator?.removeBehavior(behaviour)
+                }
+                
+                // snap back also the preview image
+                // default case - just snap back
+                snap2 = UISnapBehavior(item: imageView2, snapTo: CGPoint(x: screenWidth / 2, y: screenHeight / 2 ))
+                snap2?.damping =  2
+                animator?.addBehavior(snap2!)
+                
+                // reset the preview mode since we are loading a new image
+                previewMode = previewStates.none
+                ///////////////////////////////////////
+                
+                
+                
                 let gravity = UIGravityBehavior(items: [imageView])
                 
                 

    var previewMode: previewStates = previewStates.none
    
    
    // current asset list to be iterated through
    var phAssetResult: PHFetchResult<PHAsset>!
    


        
        
        // hide the preview image
        
        imageView2.alpha = 0
        
        
        // load the asset image for the detail view
        
    
