Added detection of left and right swipe