swipe back and forth implemented