adjusted swipe functionality