loop by a specified step