[#66485666] Rewrite swipe function