refactor of SWIPER