re-integratd swipe code into image loop.