onSwipe method changed to abstract