clean up swipe code