adding swipe method