refactored swiper