loops the loop