switch implemented for carousels