some quick changes to the swipe function