added swipe functionality