adding swipe events for previous and next