adds loop to repeat process