-refactoring swipe gesture