swipe function need to be fixed