swipe effect refactor