Change loop type