implemented swipe-to-dismiss