updated swipe functionality