                 transY =  transY / 3
             }
             
-
+            // moving to the right, so assume to get the previous image
+            // set up the preview image if it hasn´t been done
+            if(transX > 0  &&  previewMode != previewStates.initializedLeft){
+                setPreviewLeft()
+                
+            }
+            
+            
+            
+            // moving to the left, so assume to get the next image
+            // set up the preview image if it hasn´t been done
+            if(transX < 0  &&  previewMode != previewStates.initiailzedRight){
+                setPreviewRight()
+            }
+            
+            
+            
             // direction change and we have to reset the preview image position?
             if(transX > 0  &&  previewMode == previewStates.initiailzedRight){
                 setPreviewLeft()

                    return
                }
                
                self.imageView.image = imageResult
                
                //self.imageView.image = image! as UIImage
                print("detail image was loaded")

        
        // hide the imageview while setting the stage
        imageView2.alpha = 0.0
        
        // reset to identity transform
        imageView2.transform = CGAffineTransform.identity
        
        // set the boundaries for the image on the left side
        imageView2.frame = CGRect(x: screenWidth , y: 0, width: screenWidth, height: screenHeight)
