Implemented swipe recognition