implemented left-right swipe