add swipeBack function